package com.sc.article.controller;

import com.sc.article.pojo.ApArticle;
import com.sc.article.service.ApArticleService;
import com.sc.common.domain.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/article")
@RestController
public class ArticleController {
    @Autowired
    private ApArticleService apArticleService;

    @GetMapping("/all")
    public Result all() {
        List<ApArticle> list = apArticleService.list();
        return Result.success(list);
    }
}
